<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    body{
        height:2000px;
    }
    .parent{
        height:500px;
        width: 500px;
        background: #ee8905;
    }
    .child{
        height: 100px;
        width: 100px;
        background: pink;
    }
    .box{
        height: 100px;
        width: 100px;
        background: #058ee9;
        position:sticky;
        top:100px;
       
       
    }
</style>
<body>
    <div class="parent">
        <div class="child"></div>
    </div>
    <div class="box"></div>
</body>
</html>